package org.lyd.spring.restful.vo.req;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.lyd.spring.restful.annotation.Gender;

import java.math.BigDecimal;

/**
 * 添加员工的VO，不要要传入ID；对传入的字段进行参数校验
 * @Author:lyd
 **/
@Data
public class EmployeeAddVo {

    @NotBlank(message = "姓名不能为空")
    private String name;
    @NotNull(message = "年龄不能为空")
    private Integer age;
    @Email(message = "邮箱格式不正确")
    private String email;
    @Gender(message = "性别只能为男或女")
    private String gender;
    @NotBlank(message = "地址不能为空")
    private String address;
    private BigDecimal salary;
}
